package com.zhuang.observer.observable_example;

/**
 * @Classname Client
 * @Description 测试类
 * @Date 2021/3/28 14:36
 * @Created by dell
 */

public class Client {
    public static void main(String[] args) {
        //小偷对象
        Thief thief = new Thief("法外狂徒张三");
        //警察对象
        Policemen policemen = new Policemen("小庄警察");
        //警察盯着小偷
        thief.addObserver(policemen);
        //小偷行窃
        thief.steal();
    }

}
